﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Catering.View_Operaction;
using System.Data;
using Microsoft.Reporting.WebForms;

namespace Catering.Catering_Page.ShanShiFenXi
{
    public partial class PersonAvg_Xiaohao_3D : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Session["ddlClassId"] != null && !string.IsNullOrEmpty(Session["ddlClassId"].ToString()) && Session["ddlYear"] != null && !string.IsNullOrEmpty(Session["ddlYear"].ToString()))
                {
                    View_Monitor vm = new View_Monitor();
                    string pid = "0";
                    if (Session["UserID"] != null) pid = Session["UserID"].ToString();
                    DataTable dt = vm.GetPersonAvgXiaohao(pid, Session["ddlClassId"].ToString(), Session["ddlGroupId"].ToString(), Session["ddlYear"].ToString(), "", "");
                    ReportViewer1.LocalReport.DataSources.Clear();
                    ReportDataSource rds = new ReportDataSource("DataSet1", dt);
                    ReportViewer1.LocalReport.DataSources.Add(rds);
                }
            }

        }
    }
}